package singleton.demo07;

/**
 * 懒汉式(静态内部类), 利用静态内部类的特性, 在调用时才装载内部类
 */
public class Singleton07 {

    private Singleton07(){}

    private static class SingletonInset{
        private static final Singleton07 instance = new Singleton07();
    }

    public static Singleton07 getInstance(){
        return SingletonInset.instance;
    }
}
